﻿namespace OConf.API.Header
{
    public static class JWTConfigModel
    {
        /// <summary>
        /// 是否验证密钥，bool 类型，默认true
        /// </summary>
        public static bool ValidateIssuerSigningKey { get; set; } = true;

        /// <summary>
        /// // 密钥，string 类型，必须是复杂密钥，长度大于16
        /// </summary>
        public static string SecurityKey { get; set; }

        /// <summary>
        /// 是否验证签收方，bool 类型，默认true
        /// </summary>
        public static bool ValidateAudience { get; set; }

        /// <summary>
        /// 签收方
        /// </summary>
        public static string Audience { get; set; }

        /// <summary>
        /// 是否验证签发方，bool 类型，默认true
        /// </summary>
        public static bool ValidateIssuer { get; set; }

        /// <summary>
        /// 签发方
        /// </summary>
        public static string Issuer { get; set; }

        /// <summary>
        /// 是否验证过期时间，bool 类型，默认true，建议true
        /// </summary>
        public static bool ValidateLifetime { get; set; }

        /// <summary>
        /// JWT有效期
        /// </summary>
        public static long ExpiredTime { get; set; }
    }
}